home *** CD-ROM | disk | FTP | other *** search
- /* ---------------------------------------------------------------------------------------------
- Find_icon, code for constructing icon suites for files and folders
-
- by James W. Walker
- preferred e-mail: <mailto:jwwalker@kagi.com>
- alternate e-mail: <mailto:jwwalker@aol.com>, <jim@nisus-soft.com>
- web: <http://users.aol.com/jwwalker/>
-
- File: Get1IconSuite.h
-
- Copyright ©1997 by James W. Walker
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours.
- If you're going to re-distribute the source, please make it clear
- that the code was descended from James W. Walker's code,
- but that you've made changes.
- ---------------------------------------------------------------------------------------------
- */
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __ICONS__
- #include <Icons.h>
- #endif
-
- pascal OSErr Get1IconSuite(
- /* <-- */ Handle *theSuite,
- /* --> */ short theID,
- /* --> */ IconSelectorValue theSelector
- );
- /* ¶ Similar to the toolbox routine GetIconSuite, except that it looks in
- only the current resource file, not the whole resource chain.
- In case you're wondering why it would be necessary to ensure that
- icons come from only one file, suppose you're looking at a
- file that has its custom icon bit set, but for some reason does
- not contain a custom icon, or at least not a full family.
- Way down the resource chain, there may be another file, say a
- font file, that does have a full family of custom icons.
- So you get an unexpected icon.
-
- The icons in the resulting suite are resource handles.
-
- theSuite output: The new icon suite.
- theID input: the resource ID of the icons to fetch.
- theSelector input: an icon selector mask, as defined in <Icons.h>.
- */
-